package com.chb.microservice.provider;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;

import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Hello world!
 */
@EnableDiscoveryClient
@EnableHystrix
@EnableFeignClients
@SpringBootApplication
@EnableSwagger2
public class AppFeignTest {

	public static void main(String[] args) {
		new SpringApplicationBuilder(AppFeignTest.class).web(true).run(args);
		
	}

//	@Bean
//    public Docket docket() {
//        ApiSelectorBuilder apiSelectorBuilder = new Docket(DocumentationType.SWAGGER_2).select();
//        apiSelectorBuilder.apis(withClassAnnotation(Api.class));
//        return apiSelectorBuilder
//                .build()
//                .pathMapping("/")
//                .useDefaultResponseMessages(false)
//                .apiInfo(new ApiInfo("Service A API Doc", "Service A API Doc", "1.0", "https://github.com/yidongnan/spring-cloud-netflix-example",
//                        new Contact("Michael", "https://github.com/yidongnan", "yidongnan@gmail.com"), null, null))
//                .forCodeGeneration(true);
//    }

}
